﻿<!--
    //*********************************************************
    //
    //    Copyright (c) Microsoft. All rights reserved.
    //    This code is licensed under the Microsoft Public License.
    //    THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
    //    ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
    //    IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
    //    PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
    //
    //*********************************************************
    -->
    <Window x:Class="PhotoStreamingClient.PhotoDetailsWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Photo Details Window" Height="300" Width="450" mc:Ignorable="d" 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        xmlns:my="clr-namespace:PhotoStreamingClient.PhotoData" Loaded="Window_Loaded">
        <Grid Name="LayoutRoot">
        <StackPanel Name="textBoxPanel"  Height="210" VerticalAlignment="Top" Orientation="Vertical">
            <Grid HorizontalAlignment="Left" Name="photoInfoGrid" VerticalAlignment="Top">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Label Content="File Name:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                <TextBox Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="2" Height="23" HorizontalAlignment="Left" Margin="3" Name="fileNameTextBox" 
                         Text="{Binding Path=FileName, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" 
                         VerticalAlignment="Center" Width="140" />
                <Label Content="File size:" Grid.Column="2" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                <TextBox Grid.Column="3" Grid.Row="0" Grid.ColumnSpan="2" Height="23" HorizontalAlignment="Left" Margin="3" Name="fileSizeTextBox" 
                         Text="{Binding Path=FileSize, Mode=OneWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" 
                         VerticalAlignment="Center" Width="80" IsEnabled="False" />
                <Label Content="Taken By:" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                <TextBox Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="3" Name="takenByTextBox" 
                         Text="{Binding Path=TakenBy, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" 
                         VerticalAlignment="Center" Width="140" />
                <Label Content="Date Taken:" Grid.Column="2" Grid.Row="1" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                <DatePicker Grid.Column="3" Grid.Row="1" Height="25" HorizontalAlignment="Left" Margin="3" Name="dateTakenDatePicker" 
                            SelectedDate="{Binding Path=DateTaken, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" 
                            VerticalAlignment="Center" Width="100" />
                <Label Content="Comments:" Grid.Column="0" Grid.Row="2" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Top" />
                <TextBox Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="3" Height="80" HorizontalAlignment="Left" Margin="3" Name="commentsTextBox" 
                         Text="{Binding Path=Comments, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="320" />
            </Grid>
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
        <GroupBox Width="190">
                <GroupBox.Header>Dimensions (Width x Height)</GroupBox.Header>
                    <StackPanel Orientation="Horizontal">
                <TextBox Height="23" HorizontalAlignment="Left" Margin="3" Name="widthTextBox" 
                         Text="{Binding Path=Dimensions.Width, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" 
                         VerticalAlignment="Center" Width="80" />
                    <TextBox Height="23" HorizontalAlignment="Left" Margin="3" Name="heightTextBox" 
                         Text="{Binding Path=Dimensions.Height, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" 
                         VerticalAlignment="Center" Width="80" />
                </StackPanel>
        </GroupBox>
            <GroupBox Width="210">
                <GroupBox.Header>Exposure (F-Stop  |  Shutter  |  ISO)</GroupBox.Header>
                <StackPanel Orientation="Horizontal">
                    <TextBox Height="23" HorizontalAlignment="Left" Margin="3" Name="AperaturTextBox" 
                         Text="{Binding Path=Exposure.Aperature, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" 
                         VerticalAlignment="Center" Width="60" />
                        <TextBox Height="23" HorizontalAlignment="Left" Margin="3" Name="shutterSpeedTextBox" 
                         Text="{Binding Path=Exposure.ShutterSpeed, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" 
                         VerticalAlignment="Center" Width="60" />
                        <TextBox Height="23" HorizontalAlignment="Left" Margin="3" Name="filmSpeedTextBox" 
                         Text="{Binding Path=Exposure.FilmSpeed, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" 
                         VerticalAlignment="Center" Width="60" />
                    </StackPanel>
            </GroupBox>
            </StackPanel>
        </StackPanel>
        <StackPanel Height="40" Orientation="Horizontal" Name="buttonsPanel" VerticalAlignment="Bottom" HorizontalAlignment="Left">
            <Button Height="23" Name="setPhoto" Width="100" Margin="8,8,100,8" Click="setPhoto_Click">Change Image</Button>
            <Button Height="23" Margin="8" Name="cancelDetails" Click="cancelDetails_Click" Width="85">Cancel</Button>
            <Button Height="23" Margin="8" Name="savePhotoDetails" Width="100" Click="savePhotoDetails_Click">Save and Close</Button>
        </StackPanel>
    </Grid>
</Window>
